home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / os2 / mbase101.zip / install.cmd < prev    next >
OS/2 REXX Batch file  |  1997-04-28  |  9KB  |  295 lines

  1. /* Recreate objects script.
  2.  * 
  3.  * Generated via Object Desktop Package File 'MBase'.
  4.  * Modified by Marsiglietti Max 1997.
  5.  */
  6.  
  7. /* Register with REXX API extensions. */
  8. Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  9. Call SysLoadFuncs
  10. '@cls'
  11.  
  12. /* Get the boot drive location */
  13. OurPath = Value( 'PATH',,'OS2ENVIRONMENT' )
  14. parse var OurPath .";" BootDrv "\OS2;".
  15. BootDrv = strip(BootDrv)
  16. BootDrv = right(BootDrv, 2)
  17.  
  18. curdir = directory()
  19. say "MaxBase installation program for OS/2 Warp."
  20. say "------- ------------ ------- --- ---- -----"
  21. say
  22. say "This installation procedure will create the WPS"
  23. say " objects you will need to use MaxBase and its"
  24. say " C/S counterparts, Sportello and RXDBServer."
  25. say "Also, if this is your first MaxBase installation,"
  26. say " your "bootdrv"\config.sys file will be changed."
  27. say
  28. say "Close this window now to abort,"
  29. say "or press ENTER to proceed with"
  30. say "installation."
  31. Parse Upper Pull Answer
  32. '@start e readme.os2'
  33. CreateCollision = 'Replace' 
  34.  
  35. InnF=BootDrv'\CONFIG.MBS'
  36. OutF=BootDrv'\CONFIG.SYS'
  37. '@copy 'OutF' 'InnF' >nul'
  38. '@del 'OutF
  39.  
  40. msg.1 = "** No system files changed. **"
  41. msg.2 = "** You can start using MaxBase right now. **"
  42.  
  43. classpathpresent = 0
  44. do until lines(InnF) = 0
  45.  
  46.  InStr = linein(InnF)
  47.  
  48.  if (translate(Left(word(instr, 2), 9)) = "CLASSPATH") then
  49.   classpathpresent = 1
  50.  
  51.  if (translate(Left(word(instr, 2), 9)) = "CLASSPATH") & (pos(translate(curdir"\client"), translate(instr)) = 0) then
  52.  do
  53.   instr = strip(instr)
  54.   if right(instr, 1)\=";" then
  55.    instr = instr || ";"
  56.   instr = instr || curdir"\NetRexxR.zip;"curdir";"curdir"\taligent.zip;"curdir"\client;"curdir"\server;.\.;"
  57.   msg.1 =  "** "BootDrv"\Config.sys changed. **"
  58.   msg.2 =  "** You must now restart your computer before using MaxBase. **"
  59.  end
  60.  call lineout outf, instr
  61. end
  62. if classpathpresent=0 then
  63. do
  64.  call lineout outf, "SET CLASSPATH=" || curdir"\NetRexxR.zip;"curdir";"curdir"\taligent.zip;"curdir"\client;"curdir"\server;.\.;"
  65.   msg.1 =  "** "BootDrv"\Config.sys changed. **"
  66.   msg.2 =  "** You must now restart your computer before using MaxBase. **"
  67. end
  68.  
  69. say "Done registering changes to classpath."
  70. say msg.1
  71. say msg.2
  72. say "Press ENTER to proceed with WPS object creation."
  73. Parse Upper Pull Answer
  74.  
  75. Call CreateObjects
  76. say "Done registering objects on the WPS."
  77. Exit
  78.  
  79. CreateObject: procedure
  80.     Parse Arg Class, Title, Location, Setup, Collision
  81.     Say 'Creating ['Title']'
  82.     rc = SysCreateObject( Class, Title, Location, Setup, Collision )
  83.     If rc <> 1 Then
  84.         Say ' > failed to create ['Title' | 'Class'] at location ['Location']'
  85.     return rc
  86.  
  87. CreateObjects:
  88.  
  89. dtop = SysIni(SYSTEM, "FolderWorkareaRunningObjects", "ALL:", dtloc)
  90.  
  91. if dtloc.0 > 0 then dtop = dtloc.1
  92. say "Please enter your desktop location (ENTER="dtop")"
  93. parse pull dtuserloc .
  94. if dtuserloc \= "" then dtop = dtuserloc
  95.  
  96. rc = CreateObject( 'WPFolder',,
  97.     'MaxBase',,
  98.     '<WP_DESKTOP>',,
  99.     'NOPRINT=YES;'||,
  100.         'DEFAULTVIEW=CONTENTS;'||,
  101.         'ICONPOS=85,63;'||,
  102.         'ICONVIEWPOS=20 760 58 25;'||,
  103.         'SELFCLOSE=1;'||,
  104.         'ICONFONT=9.WarpSans;'||,
  105.         'DETAILSFONT=9.WarpSans;'||,
  106.         'TREEFONT=9.WarpSans;'||,
  107.         'ICONVIEW=NONGRID,NORMAL;'||,
  108.         'DETAILSVIEW=MINI;'||,
  109.         'ALWAYSSORT=YES;'||,
  110.         'TREEVIEW=LINES,MINI;'||,
  111.         'OBJECTID=<MaxBase>',,
  112.     CreateCollision )
  113.  
  114. rc = CreateObject( 'WPFolder',,
  115.     'Docs',,
  116.     '<MaxBase>',,
  117.     'NOPRINT=YES;'||,
  118.         'DEFAULTVIEW=CONTENTS;'||,
  119.         'ICONPOS=85,63;'||,
  120.         'ICONVIEWPOS=20 760 58 20;'||,
  121.         'SELFCLOSE=1;'||,
  122.         'ICONFONT=9.WarpSans;'||,
  123.         'DETAILSFONT=9.WarpSans;'||,
  124.         'TREEFONT=9.WarpSans;'||,
  125.         'ICONVIEW=NONGRID,NORMAL;'||,
  126.         'DETAILSVIEW=MINI;'||,
  127.         'ALWAYSSORT=YES;'||,
  128.         'TREEVIEW=LINES,MINI;'||,
  129.         'OBJECTID=<MB_DOCS>',,
  130.     CreateCollision )
  131.  
  132. rc = CreateObject( 'WPShadow',,
  133.     'db_store',,
  134.     '<MaxBase>',,
  135.     'NOPRINT=YES;'||,
  136.         'DEFAULTVIEW=UNKNOWN;'||,
  137.         'HELPPANEL=1277;'||,    
  138.         'SHADOWID=' || curdir || '\db_store;'||,
  139.         'ICONPOS=68,90',,
  140.     CreateCollision )
  141.  
  142.  
  143.   rc = CreateObject( 'WPShadow',,
  144.     'Readme.os2',,
  145.     '<MB_DOCS>',,
  146.     'DEFAULTVIEW=UNKNOWN;'||,
  147.         'HELPPANEL=4082;'||,
  148.         'SHADOWID=' || curdir || '\Readme.os2;'||,
  149.         'ICONPOS=87,19',,
  150.     CreateCollision )
  151.  
  152.  
  153.   rc = CreateObject( 'WPShadow',,
  154.     'Readme.1st',,
  155.     '<MB_DOCS>',,
  156.     'DEFAULTVIEW=UNKNOWN;'||,
  157.         'HELPPANEL=4082;'||,
  158.         'SHADOWID=' || curdir || '\Readme.1st;'||,
  159.         'ICONPOS=87,19',,
  160.     CreateCollision )
  161.  
  162.  
  163.   rc = CreateObject( 'WPShadow',,
  164.     'SportelloApplet.doc',,
  165.     '<MB_DOCS>',,
  166.     'DEFAULTVIEW=UNKNOWN;'||,
  167.         'HELPPANEL=4082;'||,
  168.         'SHADOWID=' || curdir || '\client\SportelloApplet.doc;'||,
  169.         'ICONPOS=87,19',,
  170.     CreateCollision )
  171.  
  172.  
  173.   rc = CreateObject( 'WPShadow',,
  174.     'MaxBase.doc',,
  175.     '<MB_DOCS>',,
  176.     'DEFAULTVIEW=UNKNOWN;'||,
  177.         'HELPPANEL=4082;'||,
  178.         'SHADOWID=' || curdir || '\MaxBase.doc;'||,
  179.         'ICONPOS=87,19',,
  180.     CreateCollision )
  181.  
  182.  
  183.   rc = CreateObject( 'WPShadow',,
  184.     'RXDbase.doc',,
  185.     '<MB_DOCS>',,
  186.     'DEFAULTVIEW=UNKNOWN;'||,
  187.         'HELPPANEL=4082;'||,
  188.         'SHADOWID=' || curdir || '\RXDbase.doc;'||,
  189.         'ICONPOS=87,19',,
  190.     CreateCollision )
  191.  
  192.  
  193.   rc = CreateObject( 'WPShadow',,
  194.     'RXDBclient.doc',,
  195.     '<MB_DOCS>',,
  196.     'DEFAULTVIEW=UNKNOWN;'||,
  197.         'HELPPANEL=4082;'||,
  198.         'SHADOWID=' || curdir || '\Client\RXDBclient.doc;'||,
  199.         'ICONPOS=87,19',,
  200.     CreateCollision )
  201.  
  202.  
  203.   rc = CreateObject( 'WPProgram',,
  204.       'Open local DB',,
  205.       '<MaxBase>',,
  206.       'NOTDEFAULTICON=YES;'||,
  207.           'NOPRINT=YES;'||,
  208.           'DEFAULTVIEW=RUNNING;'||,
  209.           'ICONPOS=2,6;'||,
  210.           'ASSOCFILTER=*.DAT;'||,
  211.           'EXENAME=' || curdir || '\MAXBASE.CMD;'||,
  212.           'PARAMETERS=%**F;'||,
  213.           'PROGTYPE=WINDOWABLEVIO;'||,
  214.           'MINIMIZED=YES;'||,
  215.           'ICONFILE=' || curdir || '\ICONS\MaxBase.ICO',,
  216.       CreateCollision )
  217.  
  218.   rc = CreateObject( 'WPProgram',,
  219.       'Share DB on the network',,
  220.       '<MaxBase>',,
  221.       'NOTDEFAULTICON=YES;'||,
  222.           'NOPRINT=YES;'||,
  223.           'DEFAULTVIEW=RUNNING;'||,
  224.           'HELPPANEL=15684;'||,
  225.           'ICONPOS=88,82;'||,
  226.           'ICONVIEWPOS=36 76 38 16;'||,
  227.           'ASSOCFILTER=*.DAT;'||,
  228.           'EXENAME=' || curdir || '\server\runserver.cmd;'||,
  229.           'PARAMETERS=/d:%**F /p:[Port?] /l:log.txt /a:[Password? ENTER=none];'||,
  230.           'PROGTYPE=WINDOWABLEVIO;'||,
  231.           'NOAUTOCLOSE=YES;'||,
  232.           'ICONFILE=' || curdir || '\ICONS\RXDBServer.ICO',,
  233.       CreateCollision )
  234.  
  235.   rc = CreateObject( 'WPProgram',,
  236.       'Access a remote DB',,
  237.       '<MaxBase>',,
  238.       'NOTDEFAULTICON=YES;'||,
  239.           'NOPRINT=YES;'||,
  240.           'DEFAULTVIEW=RUNNING;'||,
  241.           'HELPPANEL=15684;'||,
  242.           'ICONPOS=16,6;'||,
  243.           'EXENAME=' || curdir || '\client\runclient.cmd;'||,
  244.           'PARAMETERS=[Host?] [Port?] [Password? ENTER=none];'||,
  245.           'PROGTYPE=WINDOWABLEVIO;'||,
  246.           'MINIMIZED=YES;'||,
  247.           'ICONFILE=' || curdir || '\ICONS\RXDBClient.ICO',,
  248.       CreateCollision )
  249.  
  250. rc = CreateObject( 'WPFolder',,
  251.     'NewDB',,
  252.     '<MaxBase>',,
  253.     'TEMPLATE=YES;'||,
  254.         'DEFAULTVIEW=CONTENTS;'||,
  255.         'HELPPANEL=15685;'||,
  256.         'ICONPOS=54,82;'||,
  257.         'SELFCLOSE=1;'||,
  258.         'ICONVIEWPOS=38 73 33 18;'||,
  259.         'ALWAYSSORT=YES;'||,
  260.         'OBJECTID=<NewDB>',,
  261.     CreateCollision )
  262.  
  263. '@copy 'curdir'\rxdb.dat 'dtop'\MaxBase\NewDB'
  264.  
  265. rc = CreateObject( 'WPUrl',,
  266.     'Get the latest Java 1.02 runtime for OS/2!',,
  267.     '<MaxBase>',,
  268.     'DEFAULTVIEW=CONTENTS;'||,
  269.     'URL=ftp://ftp.hursley.ibm.com/pub/java/fixes/os2/102/;'||,
  270.     'ICONPOS=56,47',,
  271.     CreateCollision )
  272.  
  273.  
  274.   rc = CreateObject( 'WPShadow',,
  275.     'readme.plugins',,
  276.     '<MB_DOCS>',,
  277.     'DEFAULTVIEW=UNKNOWN;'||,
  278.         'HELPPANEL=4082;'||,
  279.         'SHADOWID=' || curdir || '\readme.plugins;'||,
  280.         'ICONPOS=87,19',,
  281.     CreateCollision )
  282.  
  283.   rc = CreateObject( 'WPProgram',,
  284.       'SmartGuide to MaxBase',,
  285.       '<MaxBase>',,
  286.           'NOPRINT=YES;'||,
  287.           'DEFAULTVIEW=RUNNING;'||,
  288.           'HELPPANEL=15684;'||,
  289.           'ICONPOS=16,6;'||,
  290.           'STARTUPDIR=' || curdir || ';' ||,
  291.           'EXENAME=sguide.exe;'||,
  292.           'PARAMETERS=' || curdir || '\mbase.sgs;',,
  293.       CreateCollision )
  294. return
  295.